/**
* Created by weiyongming on 2019-01-26
*/
import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Image,
    Platform,
    TouchableOpacity,
    InteractionManager
} from 'react-native';
import {Navigation} from 'react-native-navigation';
import BaseComponet from '../BaseComponet';
class Home extends BaseComponet{

  static get options(){
    return{
      topBar:{
        visible:true,
        title:{
          text:'首页'
        },
      },
      bottomTabs:{
        visible: true,
      }
    }
  }

  static defaultProps = {
    data:[],
  };
  constructor(props) {
      super(props);
    this.state = {
      ...this.state,
      // backColor:'green',
    };
  }
  render(){
    return(
      <View style={[styles.container,{backgroundColor:this.state.backcolorStr}]}>
        <TouchableOpacity style={{marginTop:100}} onPress={()=>this.clickView()}>
          <Text>clickView</Text>
        </TouchableOpacity>
      </View>
     );
  }
  clickView(){
    Navigation.push(this.props.componentId,{
      component:{
        name:'app.HomeDetile',
        options:{

        }
      }
    });
  }
}


const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
});

export default Home;